<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item v-for="item in items" :key="item.id" :to="item.path">
        {{item.title}}
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>

<script>
import { Breadcrumb, BreadcrumbItem } from 'element-ui'

export default {
  name: 'breadcrumb',
  props: {
    // [{id1, title1, path1}, {id2, title2, path2}]
    items: Array
  },
  components: {
    [Breadcrumb.name]: Breadcrumb,
    [BreadcrumbItem.name]: BreadcrumbItem
  }
}
</script>

<style scoped>

</style>
